package sri.proiect.controllers;

import java.util.Comparator;

import sri.proiect.models.Hotel;

public class HitsComparator implements Comparator{

	@Override
	public int compare(Object obj1, Object obj2) {
	
		int hotel1Hits = ((Hotel)obj1).getHits();        
		int hotel2Hits = ((Hotel)obj1).getHits();
		        
		if(hotel1Hits > hotel2Hits)
			return 1;
		         else if(hotel1Hits < hotel1Hits)
		             return -1;
		        else
		            return 0;
	}

}
